package top.birdhk.TestAPI.source;

import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

/**
 * Source文件读取
 */

public class SourceFile {

    public static void main(String[] args) throws Exception {


        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        DataStreamSource<String> stringDataStreamSource = env.readTextFile("E:\\flink\\wordcount\\src\\main\\resources\\sensor.txt");

        stringDataStreamSource.print();

        env.execute();


    }

}
